import request from '@/utils/request';
import { stringify } from 'qs';
export default {
    getShopGoods(payload) {
        return request({
            url: `/api/getShopGoods?${stringify(payload)}`,
            method: 'get'
        })
    },
    getShopGoodsByType(payload) {
        return request({
            url: `/api/getShopGoodsByType?${stringify(payload)}`,
            method: 'get'
        })
    },
    setGoods(payload) {
        return request({
            url: '/api/setGoods',
            method: 'post',
            data: payload
        })
    },
    searchGoodsInShop(payload) {
        return request({
            url: `/api/searchGoodsInShop?${stringify(payload)}`,
            method: 'get',
        })
    },
    getUpdateGoodsInfo(payload) {
        return request({
            url: `/api/getUpdateGoodsInfo?${stringify(payload)}`,
            method: 'get',
        })
    },
    goodsUpshelf(payload) {
        return request({
            url: `/api/goodsUpshelf?${stringify(payload)}`,
            method: 'put',
        })
    },
    goodsDownshelf(payload) {
        return request({
            url: `/api/goodsDownshelf?${stringify(payload)}`,
            method: 'put',
        })
    },
    updateGoodsInfo(payload){
        return request({
            url: `/api/updateGoodsInfo`,
            method: 'put',
            data: payload
        })
    },
    getShopScore(payload){
        return request({
            url: `/api/getShopScore?${stringify(payload)}`,
            method: 'get',
        })
    }
};